package com.chanel.iamframework.core.domain;

import java.util.ArrayList;
import java.util.List;

import javax.validation.constraints.NotNull;

public class Role {
	
    private Long roleId;

    private String roleName;

    private String roleLabel;

    private String roleDescription;

    private List<Group> groups = new ArrayList<Group>();
    
    private List<Application> applications = new ArrayList<Application>();
    
    private List<User> users = new ArrayList<User>();
    
    public Role() {}
    
    public Role(String roleName, String roleLabel, String roleDescription) {
    	this.roleName = roleName;
    	this.roleLabel = roleLabel;
    	this.roleDescription = roleDescription;
	}

    public Role(String roleName, String roleLabel) {
    	this(roleName, roleLabel, null);
	}

	public List<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}

	public List<Application> getApplications() {
		return applications;
	}

	public void setApplications(List<Application> applications) {
		this.applications = applications;
	}

	public List<Group> getGroups() {
		return groups;
	}

	public void setGroups(List<Group> groups) {
		this.groups = groups;
	}

	public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(@NotNull Long roleId) {
        this.roleId = roleId;
    }

    @NotNull 
    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(@NotNull String roleName) {
        this.roleName = roleName;
    }

    @NotNull 
    public String getRoleLabel() {
        return roleLabel;
    }

    public void setRoleLabel(@NotNull String roleLabel) {
        this.roleLabel = roleLabel;
    }

    public String getRoleDescription() {
        return roleDescription;
    }

    public void setRoleDescription(String roleDescription) {
        this.roleDescription = roleDescription;
    }
    
    @Override
    public String toString() {
    	return "Role ==> {" +
    			"roleId = " + roleId + 
    			", roleName = " + roleName + 
    			", roleLabel = " + roleLabel + 
    			", roleDescription = " + roleDescription + 
    			"}";
    }
}